package com.rhb.oa.news.business;

import java.util.List;

import com.rhb.exception.DuplicateException;
import com.rhb.oa.news.bean.*;
import com.rhb.oa.news.dao.NewsDAO;


public class NewsBusiness_SpringImpl implements NewsBusiness {
	
	private NewsDAO eDAO;
	
	public NewsDAO getNewsDAO(){
		return eDAO;
	}
	public void setNewsDAO(NewsDAO exDAO){
		this.eDAO = exDAO;
	}

	public void delete(News ex) {
		this.eDAO.delete(ex);
	}

	public News findByPk(String pk) {
		return this.eDAO.findByPK(pk);
	}

	public String create(News ex) throws DuplicateException{
			return this.eDAO.create(ex);
	}

	public void update(News ex)  throws DuplicateException{
			this.eDAO.update(ex);
	}

	public List findByQuery(NewsQuery qe, int start, int count) {	
		return this.eDAO.findByQuery(qe, start, count);
	}
	
	public int getAllCount_findByQuery(NewsQuery qe) {	
		return this.eDAO.getAllCount_findByQuery(qe);
	}


}
